![]() |
CatMove |
||||
Header: | Files.h | Carbon status: | Supported | |
Moves files or directories from one directory to another on the same volume.
OSErr CatMove ( SInt16 vRefNum, SInt32 dirID, ConstStr255Param oldName, SInt32 newDirID, ConstStr255Param newName );
A volume reference number, a working directory reference number, or 0 for the default volume.
A directory ID.
An existing filename or directory name.
If newName is empty, the directory ID of the target directory; otherwise, the parent directory ID of the target directory.
The name of the directory to which the file or directory is to be moved. If a valid directory name is provided for newName, the destination directory’s parent directory is specified in newDirID. However, you can specify an empty name for newName, in which case newDirID should be set to the directory ID of the destination directory.
It is usually simplest to specify the destination directory by passing its directory ID in the newDirID parameter and by setting newName to an empty name. To specify an empty name, set newName to ':'.
A result code.
CatMove is strictly a file catalog operation; it does not actually change the location of the file or directory on the disk.
The CatMove function cannot move a file or directory to another volume (that is, the vRefNum parameter is used in specifying both the source and the destination). Also, you cannot use it to rename files or directories; to rename a file or directory, use HRename.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)